package govenor.status;

import govenor.manager.GovenorManager;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

public class ClientStatusManager {

	private GovenorManager manager;
	
	public static final int STATUS_CHECK_PERIOD = 30;
	public static final int NUMBER_OF_STATUS_THREADS = 4;
	private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(NUMBER_OF_STATUS_THREADS);
	
	public ClientStatusManager(GovenorManager manager) {
		this.manager = manager;
		
		scheduler.scheduleAtFixedRate(new ClientStatusHandler(this.manager), 10, STATUS_CHECK_PERIOD, TimeUnit.SECONDS);
	}
	
	
}
